package com.activiti.z_six.mapper.taskAssigneeMapper;

import com.activiti.z_six.entity.taskAssignee.GenerWork;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
@Repository
public interface GenerWorkMapper {
    /**
    获取工作列表
     */
    List<GenerWork> generWorkList(@Param("username")String username,
                                  @Param("pageNum")Integer pageNum,
                                  @Param("pagesize")Integer pagesize,
                                  @Param("flowName")String flowName);
    List<GenerWork> allGenerWork(@Param("username")String username,@Param("flowName")String flowName);
    List<GenerWork> generWorkNum(@Param("username")String username,@Param("flowName")String flowName);

    /**
     * 获取待办列表
     * @param username
     * @param pageNum
     * @param pagesize
     * @param flowName
     * @return
     */
    List<GenerWork> getTodoList(@Param("username")String username,
                                @Param("pageNum")Integer pageNum,
                                @Param("pagesize")Integer pagesize,
                                @Param("flowName")String flowName);

    /**
     * 获取待办数量
     * @param username
     * @param flowName
     * @return
     */
    List<GenerWork> getTodoListNum(@Param("username")String username,@Param("flowName")String flowName);

    /**
     * 已审核列表
     * @param username
     * @param pageNum
     * @param pagesize
     * @param flowName
     * @return
     */
    List<GenerWork> getDoneList(@Param("username")String username,
                                @Param("pageNum")Integer pageNum,
                                @Param("pagesize")Integer pagesize,
                                @Param("flowName")String flowName);

    /**
     * 已审核数量
     * @param username
     * @param flowName
     * @return
     */
    List<GenerWork> getDoneListNum(@Param("username")String username,@Param("flowName")String flowName);
    /*
    获取工作信息
     */
    GenerWork generWork(@Param("id")String id);
    /*
    新增记录
     */
    int insertGenerWork(GenerWork generWork);
    /*
    修改
     */
    int updateGenerWork(GenerWork generWork);
    /*
    删除
     */
    int deleteGenerWork(@Param("id")String id);
    int updateFlowWork(GenerWork generWork);
}
